From: Jasper St. Pierre Date: Sun, 29 Apr 2012 20:41:08 +0000 (-0400) Subject: environment: Allow window.log to take multiple arguments X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~6632 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=32107ba8b5c5756e4ffa05ef8acce8f60ca5994b;p=gnome-shell.git environment: Allow window.log to take multiple arguments https://bugzilla.gnome.org/show_bug.cgi?id=675104 --- diff --git a/js/ui/environment.js b/js/ui/environment.js index 435eed1e8..fc3992ae2 100644 --- a/js/ui/environment.js +++ b/js/ui/environment.js @@ -39,11 +39,19 @@ function _patchContainerClass(containerClass) { }; } +function _makeLoggingFunc(func) { + return function() { + return func([].join.call(arguments, ', ')); + }; +} + function init() { // Add some bindings to the global JS namespace; (gjs keeps the web // browser convention of having that namespace be called 'window'.) window.global = Shell.Global.get(); + window.log = _makeLoggingFunc(window.log); + window._ = Gettext.gettext; window.C_ = Gettext.pgettext; window.ngettext = Gettext.ngettext;